package com.jintian.smart.kernel.flowable.mapper;

import com.jintian.smart.kernel.core.auth.IOperator;
import com.jintian.smart.kernel.flowable.domain.entity.ActHiTaskInst;
import org.apache.ibatis.annotations.Mapper;
import org.beetl.sql.core.page.PageRequest;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.util.List;
import java.util.Map;

@Mapper
@SqlResource("task.taskCenter")
@SuppressWarnings("rawtypes")
public interface ITaskVoMapper {
    PageResult<ActHiTaskInst> queryWaitingTask(@Param("operator") IOperator operator, PageRequest page);

    PageResult<ActHiTaskInst> queryDoneTask(@Param("operator") IOperator operator, PageRequest page);

    PageResult<ActHiTaskInst> queryFinishTask(@Param("operator") IOperator operator, PageRequest page);

    PageResult<ActHiTaskInst> queryAbortTask(@Param("operator") IOperator operator, PageRequest page);

    List<Map<String, Object>> statisticsWaitingTask(@Param("operator") IOperator operator);

    List<Map<String, Object>> statisticsDoneTask(@Param("operator") IOperator operator);

    List<Map<String, Object>> statisticsFinishTask(@Param("operator") IOperator operator);

    List<Map<String, Object>> statisticsAbortTask(@Param("operator") IOperator operator);
}
